<template>
  <div class="person"></div>
</template>

<script setup lang="ts" name="Person">
// 引入类型时，需要在加上 type
import { type PersonInter, type Persons } from "@/types"; // @ = src
let person: PersonInter = { id: "hashfash2", name: "张三", age: 60 };

let personList: Persons = [
  { id: "hashfash2", name: "张三", age: 60 },
  { id: "hashfash3", name: "李四", age: 20 },
  { id: "hashfash4", name: "王五", age: 30 },
];
</script>

<style scoped>
.person {
  background-color: skyblue;
  box-shadow: 0 0 10px;
  border-radius: 10px;
  padding: 20px;
}
button {
  margin: 0 5px;
}
li {
  font-size: 20px;
}
</style>
